﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quartz;
using Quartz.Impl.Calendar;
using System.Threading;
using Quartz.Impl;
using log4net.Config;
using Topshelf;
using Topshelf.Logging;

namespace FJHost
{
    class FJHost
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        static void Main(string[] args)
        {

            var host = HostFactory.New(sc =>
           {
               sc.StartAutomatically();
               sc.Service<ServicesSchedule>(() => new ServicesSchedule());
               sc.RunAsLocalSystem();
               sc.SetDescription("福建烟草，人员相关等的同步。");
               sc.SetDisplayName("福建烟草同步");
               sc.SetServiceName("FJSync");
               //sc.UseLog4Net();
           });
            host.Run();
        }
    }
}
